<template>
  <div @click="back" class="back-level">{{title || $t('common.Return')}}</div>
</template>

<script>
export default {
  name: "backLevel",
  props:['title','goPage'],
  methods:{
    back(){

      if (typeof this.goPage === "function"){
        this.goPage()
      }else{
        this.$router.go(-1)
      }
    }
  }
}
</script>

<style scoped lang="scss">
.back-level{
  padding: 0 13px;
  height: 32px;
  background: transparent;
  border-radius: 16px;
  border: 1px solid #035BEB;
  font-size: 14px;
  font-weight: 400;
  color: #035BEB;
  line-height: 32px;
  display: inline-block;
  cursor: pointer;
  position: absolute;
  top: 79px;
  right: 24px;
  z-index: 1;
  &:hover{
    background: rgba(3,91,235,0.1);
    transition: all .3s linear;
  }
}
</style>
